home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global gDernierTemps, gAccelere, gVitesse, gTrajet, gEcartTete, gEcartGueule, gFrottement, gNumOs, gCroque, gNumChien, gBoiteOs, gCompteOs, gNiveauDuJeu, gChrono
- if gNiveauDuJeu = "B" then
- set vNumChrono to integer(the timer / 300)
- set the castNum of sprite 47 to vNumChrono + gChrono
- updateStage()
- if the timer > 3600 then
- go("NewGame")
- end if
- end if
- set vTemps to the timer
- set vTempsEcoule to vTemps - gDernierTemps
- set gDernierTemps to vTemps
- set gVitesse to ((gAccelere + gFrottement) * vTempsEcoule) + gVitesse
- set gTrajet to ((gAccelere + gFrottement) * vTempsEcoule * vTempsEcoule) + (gVitesse * vTempsEcoule) + gTrajet
- if gTrajet > 727 then
- set gTrajet to 697
- set gAccelere to 0
- set gVitesse to 0.70000000000000007
- else
- if gTrajet < -79 then
- set gTrajet to -49
- set gAccelere to 0
- set gVitesse to -0.70000000000000007
- end if
- end if
- set the locH of sprite 5 to gTrajet
- set the locH of sprite 7 to gTrajet + gEcartTete
- set the locH of sprite 8 to gTrajet + gEcartGueule
- if the mouseDown then
- if gAccelere > 0 then
- set gAccelere to gAccelere + 0.10000000000000001
- else
- if gAccelere < 0 then
- set gAccelere to gAccelere - 0.10000000000000001
- end if
- end if
- else
- set gAccelere to 0
- end if
- if (gVitesse < 0.10000000000000001) and (gVitesse > -0.10000000000000001) then
- set gVitesse to 0
- set gFrottement to 0
- else
- set gFrottement to -gVitesse / 20
- end if
- set the locV of sprite 16 to the locV of sprite 16 + (2 * vTempsEcoule)
- if the locV of sprite 16 >= 449 then
- set the castNum of sprite 16 to gNumOs + random(4)
- set the locV of sprite 16 to -25
- set the locH of sprite 16 to random(540) + 10
- end if
- if sprite 16 intersects 8 then
- set the locV of sprite 16 to 500
- set gCroque to 1
- set gCompteOs to gCompteOs + 1
- set the castNum of sprite 15 to gBoiteOs + gCompteOs
- puppetSound(1, "VALISES croqueOs")
- end if
- if gCroque > 0 then
- set the castNum of sprite 7 to gCroque + gNumChien
- set gCroque to gCroque + 1
- if gCroque > 5 then
- set gCroque to 0
- set the castNum of sprite 7 to gNumChien
- if gCompteOs = 11 then
- go("finJeu")
- end if
- end if
- end if
- if not soundBusy(1) then
- puppetSound(1, "VALISES moteur")
- updateStage()
- end if
- go(the frame)
- end
-